package com.ruoyi.report.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * Shipping Program Report 数据表，存储 Walmart 平台的商品运输计划信息
 * @TableName walmart_shipping_program_report
 */
@TableName(value ="walmart_shipping_program_report")
@Data
public class WalmartShippingProgramReport implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)  // 设置主键和主键策略
    private Long id;
    /**
     * 商品的 SKU（库存单位），如果没有配套的运输计划，则该字段为 "No shipping program found"
     */
    @TableField(value = "sku")
    private String sku;

    /**
     * 商品的唯一标识符，若无数据则为空
     */
    @TableField(value = "item_id")
    private String itemId;

    /**
     * 商品名称，若无数据则为空
     */
    @TableField(value = "product_name")
    private String productName;

    /**
     * 商品的发布状态（如：Active，Inactive等），若无数据则为空
     */
    @TableField(value = "publish_status")
    private String publishStatus;

    /**
     * 商品生命周期状态（如：Active，Inactive等），若无数据则为空
     */
    @TableField(value = "lifecycle_status")
    private String lifecycleStatus;

    /**
     * 商品是否参与运输计划（如：Yes，No等），若无数据则为空
     */
    @TableField(value = "program_participation")
    private String programParticipation;

    /**
     * 模板的唯一标识符，若无数据则为空
     */
    @TableField(value = "template_id")
    private String templateId;

    /**
     * 模板类型（如：标准，特殊等），若无数据则为空
     */
    @TableField(value = "template_type")
    private String templateType;

    /**
     * 运输计划覆盖的地区或区域，若无数据则为空
     */
    @TableField(value = "coverage_areas")
    private String coverageAreas;

    /**
     * 唯一请求id
     */
    @TableField(value = "request_id")
    private String requestId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WalmartShippingProgramReport other = (WalmartShippingProgramReport) that;
        return (this.getSku() == null ? other.getSku() == null : this.getSku().equals(other.getSku()))
            && (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
            && (this.getPublishStatus() == null ? other.getPublishStatus() == null : this.getPublishStatus().equals(other.getPublishStatus()))
            && (this.getLifecycleStatus() == null ? other.getLifecycleStatus() == null : this.getLifecycleStatus().equals(other.getLifecycleStatus()))
            && (this.getProgramParticipation() == null ? other.getProgramParticipation() == null : this.getProgramParticipation().equals(other.getProgramParticipation()))
            && (this.getTemplateId() == null ? other.getTemplateId() == null : this.getTemplateId().equals(other.getTemplateId()))
            && (this.getTemplateType() == null ? other.getTemplateType() == null : this.getTemplateType().equals(other.getTemplateType()))
            && (this.getCoverageAreas() == null ? other.getCoverageAreas() == null : this.getCoverageAreas().equals(other.getCoverageAreas()))
            && (this.getRequestId() == null ? other.getRequestId() == null : this.getRequestId().equals(other.getRequestId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSku() == null) ? 0 : getSku().hashCode());
        result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getPublishStatus() == null) ? 0 : getPublishStatus().hashCode());
        result = prime * result + ((getLifecycleStatus() == null) ? 0 : getLifecycleStatus().hashCode());
        result = prime * result + ((getProgramParticipation() == null) ? 0 : getProgramParticipation().hashCode());
        result = prime * result + ((getTemplateId() == null) ? 0 : getTemplateId().hashCode());
        result = prime * result + ((getTemplateType() == null) ? 0 : getTemplateType().hashCode());
        result = prime * result + ((getCoverageAreas() == null) ? 0 : getCoverageAreas().hashCode());
        result = prime * result + ((getRequestId() == null) ? 0 : getRequestId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", sku=").append(sku);
        sb.append(", itemId=").append(itemId);
        sb.append(", productName=").append(productName);
        sb.append(", publishStatus=").append(publishStatus);
        sb.append(", lifecycleStatus=").append(lifecycleStatus);
        sb.append(", programParticipation=").append(programParticipation);
        sb.append(", templateId=").append(templateId);
        sb.append(", templateType=").append(templateType);
        sb.append(", coverageAreas=").append(coverageAreas);
        sb.append(", requestId=").append(requestId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}